0 Prolog
↳1 UnifyTransformerProof (⇔, 0 ms)
↳2 Prolog
↳3 UndefinedPredicateHandlerProof (⇒, 0 ms)
↳4 Prolog
↳5 PrologToPiTRSProof (⇒, 149 ms)
↳6 PiTRS
↳7 DependencyPairsProof (⇔, 618 ms)
↳8 PiDP
↳9 DependencyGraphProof (⇔, 0 ms)
↳10 AND
↳11 PiDP
↳12 UsableRulesProof (⇔, 0 ms)
↳13 PiDP
↳14 PiDPToQDPProof (⇒, 0 ms)
↳15 QDP
↳16 QDPSizeChangeProof (⇔, 0 ms)
↳17 YES
↳18 PiDP
↳19 UsableRulesProof (⇔, 0 ms)
↳20 PiDP
↳21 PiDPToQDPProof (⇒, 0 ms)
↳22 QDP
↳23 QDPSizeChangeProof (⇔, 0 ms)
↳24 YES
money_in_aaaaaaaa(S, E, N, D, M, O, R, Y) → U48_aaaaaaaa(S, E, N, D, M, O, R, Y, carry_in_a(C1))
carry_in_a(1) → carry_out_a(1)
carry_in_a(0) → carry_out_a(0)
U48_aaaaaaaa(S, E, N, D, M, O, R, Y, carry_out_a(C1)) → U49_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, carry_in_a(C2))
U49_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, carry_out_a(C2)) → U50_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, carry_in_a(C3))
U50_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, carry_out_a(C3)) → U51_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, carry_in_a(C4))
U51_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, carry_out_a(C4)) → U52_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =_in_ga(C4, M))
=_in_ga(X, X) → =_out_ga(X, X)
U52_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =_out_ga(C4, M)) → U53_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =\=_in_gg(M, 0))
=\=_in_gg(X0, X1) → =\=_out_gg(X0, X1)
U53_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =\=_out_gg(M, 0)) → U54_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, domain_in_gg(.(S, .(E, .(N, .(D, .(M, .(O, .(R, .(Y, [])))))))), .(0, .(1, .(2, .(3, .(4, .(5, .(6, .(7, .(8, .(9, []))))))))))))
domain_in_gg([], X3) → domain_out_gg([], X3)
domain_in_gg(.(X1, R), L) → U65_gg(X1, R, L, del_in_aga(X1, L, NL))
del_in_aga(X, .(X, T), T) → del_out_aga(X, .(X, T), T)
del_in_aga(X, .(Y, T), .(Y, NT)) → U67_aga(X, Y, T, NT, del_in_aga(X, T, NT))
U67_aga(X, Y, T, NT, del_out_aga(X, T, NT)) → del_out_aga(X, .(Y, T), .(Y, NT))
U65_gg(X1, R, L, del_out_aga(X1, L, NL)) → U66_gg(X1, R, L, domain_in_gg(R, NL))
U66_gg(X1, R, L, domain_out_gg(R, NL)) → domain_out_gg(.(X1, R), L)
U54_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, domain_out_gg(.(S, .(E, .(N, .(D, .(M, .(O, .(R, .(Y, [])))))))), .(0, .(1, .(2, .(3, .(4, .(5, .(6, .(7, .(8, .(9, [])))))))))))) → U55_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =\=_in_ag(S, 0))
=\=_in_ag(X0, X1) → =\=_out_ag(X0, X1)
U55_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =\=_out_ag(S, 0)) → U56_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, calc_in_gagga(C3, S, M, C4, O))
calc_in_gagga(C0, D, E, C1, Y) → U60_gagga(C0, D, E, C1, Y, sum_in_gaa(C0, D, CD))
sum_in_gaa(X, Y, Z) → U64_gaa(X, Y, Z, is_in_ag(Z, +(X, Y)))
is_in_ag(X0, X1) → is_out_ag(X0, X1)
U64_gaa(X, Y, Z, is_out_ag(Z, +(X, Y))) → sum_out_gaa(X, Y, Z)
U60_gagga(C0, D, E, C1, Y, sum_out_gaa(C0, D, CD)) → U61_gagga(C0, D, E, C1, Y, sum_in_aga(CD, E, S))
sum_in_aga(X, Y, Z) → U64_aga(X, Y, Z, is_in_ag(Z, +(X, Y)))
U64_aga(X, Y, Z, is_out_ag(Z, +(X, Y))) → sum_out_aga(X, Y, Z)
U61_gagga(C0, D, E, C1, Y, sum_out_aga(CD, E, S)) → U62_gagga(C0, D, E, C1, Y, S, carry10_in_ga(C1, C10))
carry10_in_ga(0, 0) → carry10_out_ga(0, 0)
carry10_in_ga(1, 10) → carry10_out_ga(1, 10)
U62_gagga(C0, D, E, C1, Y, S, carry10_out_ga(C1, C10)) → U63_gagga(C0, D, E, C1, Y, sum_in_gaa(C10, Y, S))
U63_gagga(C0, D, E, C1, Y, sum_out_gaa(C10, Y, S)) → calc_out_gagga(C0, D, E, C1, Y)
U56_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, calc_out_gagga(C3, S, M, C4, O)) → U57_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, calc_in_gaaga(C2, E, O, C3, N))
calc_in_gaaga(C0, D, E, C1, Y) → U60_gaaga(C0, D, E, C1, Y, sum_in_gaa(C0, D, CD))
U60_gaaga(C0, D, E, C1, Y, sum_out_gaa(C0, D, CD)) → U61_gaaga(C0, D, E, C1, Y, sum_in_aaa(CD, E, S))
sum_in_aaa(X, Y, Z) → U64_aaa(X, Y, Z, is_in_ag(Z, +(X, Y)))
U64_aaa(X, Y, Z, is_out_ag(Z, +(X, Y))) → sum_out_aaa(X, Y, Z)
U61_gaaga(C0, D, E, C1, Y, sum_out_aaa(CD, E, S)) → U62_gaaga(C0, D, E, C1, Y, S, carry10_in_ga(C1, C10))
U62_gaaga(C0, D, E, C1, Y, S, carry10_out_ga(C1, C10)) → U63_gaaga(C0, D, E, C1, Y, sum_in_gaa(C10, Y, S))
U63_gaaga(C0, D, E, C1, Y, sum_out_gaa(C10, Y, S)) → calc_out_gaaga(C0, D, E, C1, Y)
U57_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, calc_out_gaaga(C2, E, O, C3, N)) → U58_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, calc_in_gaaga(C1, N, R, C2, E))
U58_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, calc_out_gaaga(C1, N, R, C2, E)) → U59_aaaaaaaa(S, E, N, D, M, O, R, Y, calc_in_gaaga(0, D, E, C1, Y))
U59_aaaaaaaa(S, E, N, D, M, O, R, Y, calc_out_gaaga(0, D, E, C1, Y)) → money_out_aaaaaaaa(S, E, N, D, M, O, R, Y)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
money_in_aaaaaaaa(S, E, N, D, M, O, R, Y) → U48_aaaaaaaa(S, E, N, D, M, O, R, Y, carry_in_a(C1))
carry_in_a(1) → carry_out_a(1)
carry_in_a(0) → carry_out_a(0)
U48_aaaaaaaa(S, E, N, D, M, O, R, Y, carry_out_a(C1)) → U49_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, carry_in_a(C2))
U49_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, carry_out_a(C2)) → U50_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, carry_in_a(C3))
U50_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, carry_out_a(C3)) → U51_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, carry_in_a(C4))
U51_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, carry_out_a(C4)) → U52_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =_in_ga(C4, M))
=_in_ga(X, X) → =_out_ga(X, X)
U52_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =_out_ga(C4, M)) → U53_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =\=_in_gg(M, 0))
=\=_in_gg(X0, X1) → =\=_out_gg(X0, X1)
U53_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =\=_out_gg(M, 0)) → U54_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, domain_in_gg(.(S, .(E, .(N, .(D, .(M, .(O, .(R, .(Y, [])))))))), .(0, .(1, .(2, .(3, .(4, .(5, .(6, .(7, .(8, .(9, []))))))))))))
domain_in_gg([], X3) → domain_out_gg([], X3)
domain_in_gg(.(X1, R), L) → U65_gg(X1, R, L, del_in_aga(X1, L, NL))
del_in_aga(X, .(X, T), T) → del_out_aga(X, .(X, T), T)
del_in_aga(X, .(Y, T), .(Y, NT)) → U67_aga(X, Y, T, NT, del_in_aga(X, T, NT))
U67_aga(X, Y, T, NT, del_out_aga(X, T, NT)) → del_out_aga(X, .(Y, T), .(Y, NT))
U65_gg(X1, R, L, del_out_aga(X1, L, NL)) → U66_gg(X1, R, L, domain_in_gg(R, NL))
U66_gg(X1, R, L, domain_out_gg(R, NL)) → domain_out_gg(.(X1, R), L)
U54_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, domain_out_gg(.(S, .(E, .(N, .(D, .(M, .(O, .(R, .(Y, [])))))))), .(0, .(1, .(2, .(3, .(4, .(5, .(6, .(7, .(8, .(9, [])))))))))))) → U55_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =\=_in_ag(S, 0))
=\=_in_ag(X0, X1) → =\=_out_ag(X0, X1)
U55_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =\=_out_ag(S, 0)) → U56_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, calc_in_gagga(C3, S, M, C4, O))
calc_in_gagga(C0, D, E, C1, Y) → U60_gagga(C0, D, E, C1, Y, sum_in_gaa(C0, D, CD))
sum_in_gaa(X, Y, Z) → U64_gaa(X, Y, Z, is_in_ag(Z, +(X, Y)))
is_in_ag(X0, X1) → is_out_ag(X0, X1)
U64_gaa(X, Y, Z, is_out_ag(Z, +(X, Y))) → sum_out_gaa(X, Y, Z)
U60_gagga(C0, D, E, C1, Y, sum_out_gaa(C0, D, CD)) → U61_gagga(C0, D, E, C1, Y, sum_in_aga(CD, E, S))
sum_in_aga(X, Y, Z) → U64_aga(X, Y, Z, is_in_ag(Z, +(X, Y)))
U64_aga(X, Y, Z, is_out_ag(Z, +(X, Y))) → sum_out_aga(X, Y, Z)
U61_gagga(C0, D, E, C1, Y, sum_out_aga(CD, E, S)) → U62_gagga(C0, D, E, C1, Y, S, carry10_in_ga(C1, C10))
carry10_in_ga(0, 0) → carry10_out_ga(0, 0)
carry10_in_ga(1, 10) → carry10_out_ga(1, 10)
U62_gagga(C0, D, E, C1, Y, S, carry10_out_ga(C1, C10)) → U63_gagga(C0, D, E, C1, Y, sum_in_gaa(C10, Y, S))
U63_gagga(C0, D, E, C1, Y, sum_out_gaa(C10, Y, S)) → calc_out_gagga(C0, D, E, C1, Y)
U56_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, calc_out_gagga(C3, S, M, C4, O)) → U57_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, calc_in_gaaga(C2, E, O, C3, N))
calc_in_gaaga(C0, D, E, C1, Y) → U60_gaaga(C0, D, E, C1, Y, sum_in_gaa(C0, D, CD))
U60_gaaga(C0, D, E, C1, Y, sum_out_gaa(C0, D, CD)) → U61_gaaga(C0, D, E, C1, Y, sum_in_aaa(CD, E, S))
sum_in_aaa(X, Y, Z) → U64_aaa(X, Y, Z, is_in_ag(Z, +(X, Y)))
U64_aaa(X, Y, Z, is_out_ag(Z, +(X, Y))) → sum_out_aaa(X, Y, Z)
U61_gaaga(C0, D, E, C1, Y, sum_out_aaa(CD, E, S)) → U62_gaaga(C0, D, E, C1, Y, S, carry10_in_ga(C1, C10))
U62_gaaga(C0, D, E, C1, Y, S, carry10_out_ga(C1, C10)) → U63_gaaga(C0, D, E, C1, Y, sum_in_gaa(C10, Y, S))
U63_gaaga(C0, D, E, C1, Y, sum_out_gaa(C10, Y, S)) → calc_out_gaaga(C0, D, E, C1, Y)
U57_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, calc_out_gaaga(C2, E, O, C3, N)) → U58_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, calc_in_gaaga(C1, N, R, C2, E))
U58_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, calc_out_gaaga(C1, N, R, C2, E)) → U59_aaaaaaaa(S, E, N, D, M, O, R, Y, calc_in_gaaga(0, D, E, C1, Y))
U59_aaaaaaaa(S, E, N, D, M, O, R, Y, calc_out_gaaga(0, D, E, C1, Y)) → money_out_aaaaaaaa(S, E, N, D, M, O, R, Y)
MONEY_IN_AAAAAAAA(S, E, N, D, M, O, R, Y) → U48_AAAAAAAA(S, E, N, D, M, O, R, Y, carry_in_a(C1))
MONEY_IN_AAAAAAAA(S, E, N, D, M, O, R, Y) → CARRY_IN_A(C1)
U48_AAAAAAAA(S, E, N, D, M, O, R, Y, carry_out_a(C1)) → U49_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, carry_in_a(C2))
U48_AAAAAAAA(S, E, N, D, M, O, R, Y, carry_out_a(C1)) → CARRY_IN_A(C2)
U49_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, carry_out_a(C2)) → U50_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, carry_in_a(C3))
U49_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, carry_out_a(C2)) → CARRY_IN_A(C3)
U50_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, carry_out_a(C3)) → U51_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, C3, carry_in_a(C4))
U50_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, carry_out_a(C3)) → CARRY_IN_A(C4)
U51_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, C3, carry_out_a(C4)) → U52_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =_in_ga(C4, M))
U51_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, C3, carry_out_a(C4)) → =_IN_GA(C4, M)
U52_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =_out_ga(C4, M)) → U53_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =\=_in_gg(M, 0))
U52_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =_out_ga(C4, M)) → =\=_IN_GG(M, 0)
U53_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =\=_out_gg(M, 0)) → U54_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, domain_in_gg(.(S, .(E, .(N, .(D, .(M, .(O, .(R, .(Y, [])))))))), .(0, .(1, .(2, .(3, .(4, .(5, .(6, .(7, .(8, .(9, []))))))))))))
U53_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =\=_out_gg(M, 0)) → DOMAIN_IN_GG(.(S, .(E, .(N, .(D, .(M, .(O, .(R, .(Y, [])))))))), .(0, .(1, .(2, .(3, .(4, .(5, .(6, .(7, .(8, .(9, [])))))))))))
DOMAIN_IN_GG(.(X1, R), L) → U65_GG(X1, R, L, del_in_aga(X1, L, NL))
DOMAIN_IN_GG(.(X1, R), L) → DEL_IN_AGA(X1, L, NL)
DEL_IN_AGA(X, .(Y, T), .(Y, NT)) → U67_AGA(X, Y, T, NT, del_in_aga(X, T, NT))
DEL_IN_AGA(X, .(Y, T), .(Y, NT)) → DEL_IN_AGA(X, T, NT)
U65_GG(X1, R, L, del_out_aga(X1, L, NL)) → U66_GG(X1, R, L, domain_in_gg(R, NL))
U65_GG(X1, R, L, del_out_aga(X1, L, NL)) → DOMAIN_IN_GG(R, NL)
U54_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, domain_out_gg(.(S, .(E, .(N, .(D, .(M, .(O, .(R, .(Y, [])))))))), .(0, .(1, .(2, .(3, .(4, .(5, .(6, .(7, .(8, .(9, [])))))))))))) → U55_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =\=_in_ag(S, 0))
U54_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, domain_out_gg(.(S, .(E, .(N, .(D, .(M, .(O, .(R, .(Y, [])))))))), .(0, .(1, .(2, .(3, .(4, .(5, .(6, .(7, .(8, .(9, [])))))))))))) → =\=_IN_AG(S, 0)
U55_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =\=_out_ag(S, 0)) → U56_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, C3, calc_in_gagga(C3, S, M, C4, O))
U55_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =\=_out_ag(S, 0)) → CALC_IN_GAGGA(C3, S, M, C4, O)
CALC_IN_GAGGA(C0, D, E, C1, Y) → U60_GAGGA(C0, D, E, C1, Y, sum_in_gaa(C0, D, CD))
CALC_IN_GAGGA(C0, D, E, C1, Y) → SUM_IN_GAA(C0, D, CD)
SUM_IN_GAA(X, Y, Z) → U64_GAA(X, Y, Z, is_in_ag(Z, +(X, Y)))
SUM_IN_GAA(X, Y, Z) → IS_IN_AG(Z, +(X, Y))
U60_GAGGA(C0, D, E, C1, Y, sum_out_gaa(C0, D, CD)) → U61_GAGGA(C0, D, E, C1, Y, sum_in_aga(CD, E, S))
U60_GAGGA(C0, D, E, C1, Y, sum_out_gaa(C0, D, CD)) → SUM_IN_AGA(CD, E, S)
SUM_IN_AGA(X, Y, Z) → U64_AGA(X, Y, Z, is_in_ag(Z, +(X, Y)))
SUM_IN_AGA(X, Y, Z) → IS_IN_AG(Z, +(X, Y))
U61_GAGGA(C0, D, E, C1, Y, sum_out_aga(CD, E, S)) → U62_GAGGA(C0, D, E, C1, Y, S, carry10_in_ga(C1, C10))
U61_GAGGA(C0, D, E, C1, Y, sum_out_aga(CD, E, S)) → CARRY10_IN_GA(C1, C10)
U62_GAGGA(C0, D, E, C1, Y, S, carry10_out_ga(C1, C10)) → U63_GAGGA(C0, D, E, C1, Y, sum_in_gaa(C10, Y, S))
U62_GAGGA(C0, D, E, C1, Y, S, carry10_out_ga(C1, C10)) → SUM_IN_GAA(C10, Y, S)
U56_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, C3, calc_out_gagga(C3, S, M, C4, O)) → U57_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, calc_in_gaaga(C2, E, O, C3, N))
U56_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, C3, calc_out_gagga(C3, S, M, C4, O)) → CALC_IN_GAAGA(C2, E, O, C3, N)
CALC_IN_GAAGA(C0, D, E, C1, Y) → U60_GAAGA(C0, D, E, C1, Y, sum_in_gaa(C0, D, CD))
CALC_IN_GAAGA(C0, D, E, C1, Y) → SUM_IN_GAA(C0, D, CD)
U60_GAAGA(C0, D, E, C1, Y, sum_out_gaa(C0, D, CD)) → U61_GAAGA(C0, D, E, C1, Y, sum_in_aaa(CD, E, S))
U60_GAAGA(C0, D, E, C1, Y, sum_out_gaa(C0, D, CD)) → SUM_IN_AAA(CD, E, S)
SUM_IN_AAA(X, Y, Z) → U64_AAA(X, Y, Z, is_in_ag(Z, +(X, Y)))
SUM_IN_AAA(X, Y, Z) → IS_IN_AG(Z, +(X, Y))
U61_GAAGA(C0, D, E, C1, Y, sum_out_aaa(CD, E, S)) → U62_GAAGA(C0, D, E, C1, Y, S, carry10_in_ga(C1, C10))
U61_GAAGA(C0, D, E, C1, Y, sum_out_aaa(CD, E, S)) → CARRY10_IN_GA(C1, C10)
U62_GAAGA(C0, D, E, C1, Y, S, carry10_out_ga(C1, C10)) → U63_GAAGA(C0, D, E, C1, Y, sum_in_gaa(C10, Y, S))
U62_GAAGA(C0, D, E, C1, Y, S, carry10_out_ga(C1, C10)) → SUM_IN_GAA(C10, Y, S)
U57_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, calc_out_gaaga(C2, E, O, C3, N)) → U58_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, calc_in_gaaga(C1, N, R, C2, E))
U57_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, calc_out_gaaga(C2, E, O, C3, N)) → CALC_IN_GAAGA(C1, N, R, C2, E)
U58_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, calc_out_gaaga(C1, N, R, C2, E)) → U59_AAAAAAAA(S, E, N, D, M, O, R, Y, calc_in_gaaga(0, D, E, C1, Y))
U58_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, calc_out_gaaga(C1, N, R, C2, E)) → CALC_IN_GAAGA(0, D, E, C1, Y)
money_in_aaaaaaaa(S, E, N, D, M, O, R, Y) → U48_aaaaaaaa(S, E, N, D, M, O, R, Y, carry_in_a(C1))
carry_in_a(1) → carry_out_a(1)
carry_in_a(0) → carry_out_a(0)
U48_aaaaaaaa(S, E, N, D, M, O, R, Y, carry_out_a(C1)) → U49_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, carry_in_a(C2))
U49_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, carry_out_a(C2)) → U50_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, carry_in_a(C3))
U50_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, carry_out_a(C3)) → U51_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, carry_in_a(C4))
U51_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, carry_out_a(C4)) → U52_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =_in_ga(C4, M))
=_in_ga(X, X) → =_out_ga(X, X)
U52_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =_out_ga(C4, M)) → U53_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =\=_in_gg(M, 0))
=\=_in_gg(X0, X1) → =\=_out_gg(X0, X1)
U53_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =\=_out_gg(M, 0)) → U54_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, domain_in_gg(.(S, .(E, .(N, .(D, .(M, .(O, .(R, .(Y, [])))))))), .(0, .(1, .(2, .(3, .(4, .(5, .(6, .(7, .(8, .(9, []))))))))))))
domain_in_gg([], X3) → domain_out_gg([], X3)
domain_in_gg(.(X1, R), L) → U65_gg(X1, R, L, del_in_aga(X1, L, NL))
del_in_aga(X, .(X, T), T) → del_out_aga(X, .(X, T), T)
del_in_aga(X, .(Y, T), .(Y, NT)) → U67_aga(X, Y, T, NT, del_in_aga(X, T, NT))
U67_aga(X, Y, T, NT, del_out_aga(X, T, NT)) → del_out_aga(X, .(Y, T), .(Y, NT))
U65_gg(X1, R, L, del_out_aga(X1, L, NL)) → U66_gg(X1, R, L, domain_in_gg(R, NL))
U66_gg(X1, R, L, domain_out_gg(R, NL)) → domain_out_gg(.(X1, R), L)
U54_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, domain_out_gg(.(S, .(E, .(N, .(D, .(M, .(O, .(R, .(Y, [])))))))), .(0, .(1, .(2, .(3, .(4, .(5, .(6, .(7, .(8, .(9, [])))))))))))) → U55_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =\=_in_ag(S, 0))
=\=_in_ag(X0, X1) → =\=_out_ag(X0, X1)
U55_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =\=_out_ag(S, 0)) → U56_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, calc_in_gagga(C3, S, M, C4, O))
calc_in_gagga(C0, D, E, C1, Y) → U60_gagga(C0, D, E, C1, Y, sum_in_gaa(C0, D, CD))
sum_in_gaa(X, Y, Z) → U64_gaa(X, Y, Z, is_in_ag(Z, +(X, Y)))
is_in_ag(X0, X1) → is_out_ag(X0, X1)
U64_gaa(X, Y, Z, is_out_ag(Z, +(X, Y))) → sum_out_gaa(X, Y, Z)
U60_gagga(C0, D, E, C1, Y, sum_out_gaa(C0, D, CD)) → U61_gagga(C0, D, E, C1, Y, sum_in_aga(CD, E, S))
sum_in_aga(X, Y, Z) → U64_aga(X, Y, Z, is_in_ag(Z, +(X, Y)))
U64_aga(X, Y, Z, is_out_ag(Z, +(X, Y))) → sum_out_aga(X, Y, Z)
U61_gagga(C0, D, E, C1, Y, sum_out_aga(CD, E, S)) → U62_gagga(C0, D, E, C1, Y, S, carry10_in_ga(C1, C10))
carry10_in_ga(0, 0) → carry10_out_ga(0, 0)
carry10_in_ga(1, 10) → carry10_out_ga(1, 10)
U62_gagga(C0, D, E, C1, Y, S, carry10_out_ga(C1, C10)) → U63_gagga(C0, D, E, C1, Y, sum_in_gaa(C10, Y, S))
U63_gagga(C0, D, E, C1, Y, sum_out_gaa(C10, Y, S)) → calc_out_gagga(C0, D, E, C1, Y)
U56_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, calc_out_gagga(C3, S, M, C4, O)) → U57_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, calc_in_gaaga(C2, E, O, C3, N))
calc_in_gaaga(C0, D, E, C1, Y) → U60_gaaga(C0, D, E, C1, Y, sum_in_gaa(C0, D, CD))
U60_gaaga(C0, D, E, C1, Y, sum_out_gaa(C0, D, CD)) → U61_gaaga(C0, D, E, C1, Y, sum_in_aaa(CD, E, S))
sum_in_aaa(X, Y, Z) → U64_aaa(X, Y, Z, is_in_ag(Z, +(X, Y)))
U64_aaa(X, Y, Z, is_out_ag(Z, +(X, Y))) → sum_out_aaa(X, Y, Z)
U61_gaaga(C0, D, E, C1, Y, sum_out_aaa(CD, E, S)) → U62_gaaga(C0, D, E, C1, Y, S, carry10_in_ga(C1, C10))
U62_gaaga(C0, D, E, C1, Y, S, carry10_out_ga(C1, C10)) → U63_gaaga(C0, D, E, C1, Y, sum_in_gaa(C10, Y, S))
U63_gaaga(C0, D, E, C1, Y, sum_out_gaa(C10, Y, S)) → calc_out_gaaga(C0, D, E, C1, Y)
U57_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, calc_out_gaaga(C2, E, O, C3, N)) → U58_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, calc_in_gaaga(C1, N, R, C2, E))
U58_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, calc_out_gaaga(C1, N, R, C2, E)) → U59_aaaaaaaa(S, E, N, D, M, O, R, Y, calc_in_gaaga(0, D, E, C1, Y))
U59_aaaaaaaa(S, E, N, D, M, O, R, Y, calc_out_gaaga(0, D, E, C1, Y)) → money_out_aaaaaaaa(S, E, N, D, M, O, R, Y)
MONEY_IN_AAAAAAAA(S, E, N, D, M, O, R, Y) → U48_AAAAAAAA(S, E, N, D, M, O, R, Y, carry_in_a(C1))
MONEY_IN_AAAAAAAA(S, E, N, D, M, O, R, Y) → CARRY_IN_A(C1)
U48_AAAAAAAA(S, E, N, D, M, O, R, Y, carry_out_a(C1)) → U49_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, carry_in_a(C2))
U48_AAAAAAAA(S, E, N, D, M, O, R, Y, carry_out_a(C1)) → CARRY_IN_A(C2)
U49_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, carry_out_a(C2)) → U50_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, carry_in_a(C3))
U49_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, carry_out_a(C2)) → CARRY_IN_A(C3)
U50_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, carry_out_a(C3)) → U51_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, C3, carry_in_a(C4))
U50_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, carry_out_a(C3)) → CARRY_IN_A(C4)
U51_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, C3, carry_out_a(C4)) → U52_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =_in_ga(C4, M))
U51_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, C3, carry_out_a(C4)) → =_IN_GA(C4, M)
U52_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =_out_ga(C4, M)) → U53_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =\=_in_gg(M, 0))
U52_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =_out_ga(C4, M)) → =\=_IN_GG(M, 0)
U53_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =\=_out_gg(M, 0)) → U54_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, domain_in_gg(.(S, .(E, .(N, .(D, .(M, .(O, .(R, .(Y, [])))))))), .(0, .(1, .(2, .(3, .(4, .(5, .(6, .(7, .(8, .(9, []))))))))))))
U53_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =\=_out_gg(M, 0)) → DOMAIN_IN_GG(.(S, .(E, .(N, .(D, .(M, .(O, .(R, .(Y, [])))))))), .(0, .(1, .(2, .(3, .(4, .(5, .(6, .(7, .(8, .(9, [])))))))))))
DOMAIN_IN_GG(.(X1, R), L) → U65_GG(X1, R, L, del_in_aga(X1, L, NL))
DOMAIN_IN_GG(.(X1, R), L) → DEL_IN_AGA(X1, L, NL)
DEL_IN_AGA(X, .(Y, T), .(Y, NT)) → U67_AGA(X, Y, T, NT, del_in_aga(X, T, NT))
DEL_IN_AGA(X, .(Y, T), .(Y, NT)) → DEL_IN_AGA(X, T, NT)
U65_GG(X1, R, L, del_out_aga(X1, L, NL)) → U66_GG(X1, R, L, domain_in_gg(R, NL))
U65_GG(X1, R, L, del_out_aga(X1, L, NL)) → DOMAIN_IN_GG(R, NL)
U54_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, domain_out_gg(.(S, .(E, .(N, .(D, .(M, .(O, .(R, .(Y, [])))))))), .(0, .(1, .(2, .(3, .(4, .(5, .(6, .(7, .(8, .(9, [])))))))))))) → U55_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =\=_in_ag(S, 0))
U54_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, domain_out_gg(.(S, .(E, .(N, .(D, .(M, .(O, .(R, .(Y, [])))))))), .(0, .(1, .(2, .(3, .(4, .(5, .(6, .(7, .(8, .(9, [])))))))))))) → =\=_IN_AG(S, 0)
U55_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =\=_out_ag(S, 0)) → U56_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, C3, calc_in_gagga(C3, S, M, C4, O))
U55_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =\=_out_ag(S, 0)) → CALC_IN_GAGGA(C3, S, M, C4, O)
CALC_IN_GAGGA(C0, D, E, C1, Y) → U60_GAGGA(C0, D, E, C1, Y, sum_in_gaa(C0, D, CD))
CALC_IN_GAGGA(C0, D, E, C1, Y) → SUM_IN_GAA(C0, D, CD)
SUM_IN_GAA(X, Y, Z) → U64_GAA(X, Y, Z, is_in_ag(Z, +(X, Y)))
SUM_IN_GAA(X, Y, Z) → IS_IN_AG(Z, +(X, Y))
U60_GAGGA(C0, D, E, C1, Y, sum_out_gaa(C0, D, CD)) → U61_GAGGA(C0, D, E, C1, Y, sum_in_aga(CD, E, S))
U60_GAGGA(C0, D, E, C1, Y, sum_out_gaa(C0, D, CD)) → SUM_IN_AGA(CD, E, S)
SUM_IN_AGA(X, Y, Z) → U64_AGA(X, Y, Z, is_in_ag(Z, +(X, Y)))
SUM_IN_AGA(X, Y, Z) → IS_IN_AG(Z, +(X, Y))
U61_GAGGA(C0, D, E, C1, Y, sum_out_aga(CD, E, S)) → U62_GAGGA(C0, D, E, C1, Y, S, carry10_in_ga(C1, C10))
U61_GAGGA(C0, D, E, C1, Y, sum_out_aga(CD, E, S)) → CARRY10_IN_GA(C1, C10)
U62_GAGGA(C0, D, E, C1, Y, S, carry10_out_ga(C1, C10)) → U63_GAGGA(C0, D, E, C1, Y, sum_in_gaa(C10, Y, S))
U62_GAGGA(C0, D, E, C1, Y, S, carry10_out_ga(C1, C10)) → SUM_IN_GAA(C10, Y, S)
U56_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, C3, calc_out_gagga(C3, S, M, C4, O)) → U57_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, calc_in_gaaga(C2, E, O, C3, N))
U56_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, C3, calc_out_gagga(C3, S, M, C4, O)) → CALC_IN_GAAGA(C2, E, O, C3, N)
CALC_IN_GAAGA(C0, D, E, C1, Y) → U60_GAAGA(C0, D, E, C1, Y, sum_in_gaa(C0, D, CD))
CALC_IN_GAAGA(C0, D, E, C1, Y) → SUM_IN_GAA(C0, D, CD)
U60_GAAGA(C0, D, E, C1, Y, sum_out_gaa(C0, D, CD)) → U61_GAAGA(C0, D, E, C1, Y, sum_in_aaa(CD, E, S))
U60_GAAGA(C0, D, E, C1, Y, sum_out_gaa(C0, D, CD)) → SUM_IN_AAA(CD, E, S)
SUM_IN_AAA(X, Y, Z) → U64_AAA(X, Y, Z, is_in_ag(Z, +(X, Y)))
SUM_IN_AAA(X, Y, Z) → IS_IN_AG(Z, +(X, Y))
U61_GAAGA(C0, D, E, C1, Y, sum_out_aaa(CD, E, S)) → U62_GAAGA(C0, D, E, C1, Y, S, carry10_in_ga(C1, C10))
U61_GAAGA(C0, D, E, C1, Y, sum_out_aaa(CD, E, S)) → CARRY10_IN_GA(C1, C10)
U62_GAAGA(C0, D, E, C1, Y, S, carry10_out_ga(C1, C10)) → U63_GAAGA(C0, D, E, C1, Y, sum_in_gaa(C10, Y, S))
U62_GAAGA(C0, D, E, C1, Y, S, carry10_out_ga(C1, C10)) → SUM_IN_GAA(C10, Y, S)
U57_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, calc_out_gaaga(C2, E, O, C3, N)) → U58_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, calc_in_gaaga(C1, N, R, C2, E))
U57_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, C2, calc_out_gaaga(C2, E, O, C3, N)) → CALC_IN_GAAGA(C1, N, R, C2, E)
U58_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, calc_out_gaaga(C1, N, R, C2, E)) → U59_AAAAAAAA(S, E, N, D, M, O, R, Y, calc_in_gaaga(0, D, E, C1, Y))
U58_AAAAAAAA(S, E, N, D, M, O, R, Y, C1, calc_out_gaaga(C1, N, R, C2, E)) → CALC_IN_GAAGA(0, D, E, C1, Y)
money_in_aaaaaaaa(S, E, N, D, M, O, R, Y) → U48_aaaaaaaa(S, E, N, D, M, O, R, Y, carry_in_a(C1))
carry_in_a(1) → carry_out_a(1)
carry_in_a(0) → carry_out_a(0)
U48_aaaaaaaa(S, E, N, D, M, O, R, Y, carry_out_a(C1)) → U49_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, carry_in_a(C2))
U49_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, carry_out_a(C2)) → U50_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, carry_in_a(C3))
U50_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, carry_out_a(C3)) → U51_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, carry_in_a(C4))
U51_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, carry_out_a(C4)) → U52_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =_in_ga(C4, M))
=_in_ga(X, X) → =_out_ga(X, X)
U52_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =_out_ga(C4, M)) → U53_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =\=_in_gg(M, 0))
=\=_in_gg(X0, X1) → =\=_out_gg(X0, X1)
U53_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =\=_out_gg(M, 0)) → U54_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, domain_in_gg(.(S, .(E, .(N, .(D, .(M, .(O, .(R, .(Y, [])))))))), .(0, .(1, .(2, .(3, .(4, .(5, .(6, .(7, .(8, .(9, []))))))))))))
domain_in_gg([], X3) → domain_out_gg([], X3)
domain_in_gg(.(X1, R), L) → U65_gg(X1, R, L, del_in_aga(X1, L, NL))
del_in_aga(X, .(X, T), T) → del_out_aga(X, .(X, T), T)
del_in_aga(X, .(Y, T), .(Y, NT)) → U67_aga(X, Y, T, NT, del_in_aga(X, T, NT))
U67_aga(X, Y, T, NT, del_out_aga(X, T, NT)) → del_out_aga(X, .(Y, T), .(Y, NT))
U65_gg(X1, R, L, del_out_aga(X1, L, NL)) → U66_gg(X1, R, L, domain_in_gg(R, NL))
U66_gg(X1, R, L, domain_out_gg(R, NL)) → domain_out_gg(.(X1, R), L)
U54_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, domain_out_gg(.(S, .(E, .(N, .(D, .(M, .(O, .(R, .(Y, [])))))))), .(0, .(1, .(2, .(3, .(4, .(5, .(6, .(7, .(8, .(9, [])))))))))))) → U55_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =\=_in_ag(S, 0))
=\=_in_ag(X0, X1) → =\=_out_ag(X0, X1)
U55_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =\=_out_ag(S, 0)) → U56_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, calc_in_gagga(C3, S, M, C4, O))
calc_in_gagga(C0, D, E, C1, Y) → U60_gagga(C0, D, E, C1, Y, sum_in_gaa(C0, D, CD))
sum_in_gaa(X, Y, Z) → U64_gaa(X, Y, Z, is_in_ag(Z, +(X, Y)))
is_in_ag(X0, X1) → is_out_ag(X0, X1)
U64_gaa(X, Y, Z, is_out_ag(Z, +(X, Y))) → sum_out_gaa(X, Y, Z)
U60_gagga(C0, D, E, C1, Y, sum_out_gaa(C0, D, CD)) → U61_gagga(C0, D, E, C1, Y, sum_in_aga(CD, E, S))
sum_in_aga(X, Y, Z) → U64_aga(X, Y, Z, is_in_ag(Z, +(X, Y)))
U64_aga(X, Y, Z, is_out_ag(Z, +(X, Y))) → sum_out_aga(X, Y, Z)
U61_gagga(C0, D, E, C1, Y, sum_out_aga(CD, E, S)) → U62_gagga(C0, D, E, C1, Y, S, carry10_in_ga(C1, C10))
carry10_in_ga(0, 0) → carry10_out_ga(0, 0)
carry10_in_ga(1, 10) → carry10_out_ga(1, 10)
U62_gagga(C0, D, E, C1, Y, S, carry10_out_ga(C1, C10)) → U63_gagga(C0, D, E, C1, Y, sum_in_gaa(C10, Y, S))
U63_gagga(C0, D, E, C1, Y, sum_out_gaa(C10, Y, S)) → calc_out_gagga(C0, D, E, C1, Y)
U56_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, calc_out_gagga(C3, S, M, C4, O)) → U57_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, calc_in_gaaga(C2, E, O, C3, N))
calc_in_gaaga(C0, D, E, C1, Y) → U60_gaaga(C0, D, E, C1, Y, sum_in_gaa(C0, D, CD))
U60_gaaga(C0, D, E, C1, Y, sum_out_gaa(C0, D, CD)) → U61_gaaga(C0, D, E, C1, Y, sum_in_aaa(CD, E, S))
sum_in_aaa(X, Y, Z) → U64_aaa(X, Y, Z, is_in_ag(Z, +(X, Y)))
U64_aaa(X, Y, Z, is_out_ag(Z, +(X, Y))) → sum_out_aaa(X, Y, Z)
U61_gaaga(C0, D, E, C1, Y, sum_out_aaa(CD, E, S)) → U62_gaaga(C0, D, E, C1, Y, S, carry10_in_ga(C1, C10))
U62_gaaga(C0, D, E, C1, Y, S, carry10_out_ga(C1, C10)) → U63_gaaga(C0, D, E, C1, Y, sum_in_gaa(C10, Y, S))
U63_gaaga(C0, D, E, C1, Y, sum_out_gaa(C10, Y, S)) → calc_out_gaaga(C0, D, E, C1, Y)
U57_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, calc_out_gaaga(C2, E, O, C3, N)) → U58_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, calc_in_gaaga(C1, N, R, C2, E))
U58_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, calc_out_gaaga(C1, N, R, C2, E)) → U59_aaaaaaaa(S, E, N, D, M, O, R, Y, calc_in_gaaga(0, D, E, C1, Y))
U59_aaaaaaaa(S, E, N, D, M, O, R, Y, calc_out_gaaga(0, D, E, C1, Y)) → money_out_aaaaaaaa(S, E, N, D, M, O, R, Y)
DEL_IN_AGA(X, .(Y, T), .(Y, NT)) → DEL_IN_AGA(X, T, NT)
money_in_aaaaaaaa(S, E, N, D, M, O, R, Y) → U48_aaaaaaaa(S, E, N, D, M, O, R, Y, carry_in_a(C1))
carry_in_a(1) → carry_out_a(1)
carry_in_a(0) → carry_out_a(0)
U48_aaaaaaaa(S, E, N, D, M, O, R, Y, carry_out_a(C1)) → U49_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, carry_in_a(C2))
U49_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, carry_out_a(C2)) → U50_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, carry_in_a(C3))
U50_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, carry_out_a(C3)) → U51_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, carry_in_a(C4))
U51_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, carry_out_a(C4)) → U52_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =_in_ga(C4, M))
=_in_ga(X, X) → =_out_ga(X, X)
U52_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =_out_ga(C4, M)) → U53_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =\=_in_gg(M, 0))
=\=_in_gg(X0, X1) → =\=_out_gg(X0, X1)
U53_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =\=_out_gg(M, 0)) → U54_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, domain_in_gg(.(S, .(E, .(N, .(D, .(M, .(O, .(R, .(Y, [])))))))), .(0, .(1, .(2, .(3, .(4, .(5, .(6, .(7, .(8, .(9, []))))))))))))
domain_in_gg([], X3) → domain_out_gg([], X3)
domain_in_gg(.(X1, R), L) → U65_gg(X1, R, L, del_in_aga(X1, L, NL))
del_in_aga(X, .(X, T), T) → del_out_aga(X, .(X, T), T)
del_in_aga(X, .(Y, T), .(Y, NT)) → U67_aga(X, Y, T, NT, del_in_aga(X, T, NT))
U67_aga(X, Y, T, NT, del_out_aga(X, T, NT)) → del_out_aga(X, .(Y, T), .(Y, NT))
U65_gg(X1, R, L, del_out_aga(X1, L, NL)) → U66_gg(X1, R, L, domain_in_gg(R, NL))
U66_gg(X1, R, L, domain_out_gg(R, NL)) → domain_out_gg(.(X1, R), L)
U54_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, domain_out_gg(.(S, .(E, .(N, .(D, .(M, .(O, .(R, .(Y, [])))))))), .(0, .(1, .(2, .(3, .(4, .(5, .(6, .(7, .(8, .(9, [])))))))))))) → U55_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =\=_in_ag(S, 0))
=\=_in_ag(X0, X1) → =\=_out_ag(X0, X1)
U55_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =\=_out_ag(S, 0)) → U56_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, calc_in_gagga(C3, S, M, C4, O))
calc_in_gagga(C0, D, E, C1, Y) → U60_gagga(C0, D, E, C1, Y, sum_in_gaa(C0, D, CD))
sum_in_gaa(X, Y, Z) → U64_gaa(X, Y, Z, is_in_ag(Z, +(X, Y)))
is_in_ag(X0, X1) → is_out_ag(X0, X1)
U64_gaa(X, Y, Z, is_out_ag(Z, +(X, Y))) → sum_out_gaa(X, Y, Z)
U60_gagga(C0, D, E, C1, Y, sum_out_gaa(C0, D, CD)) → U61_gagga(C0, D, E, C1, Y, sum_in_aga(CD, E, S))
sum_in_aga(X, Y, Z) → U64_aga(X, Y, Z, is_in_ag(Z, +(X, Y)))
U64_aga(X, Y, Z, is_out_ag(Z, +(X, Y))) → sum_out_aga(X, Y, Z)
U61_gagga(C0, D, E, C1, Y, sum_out_aga(CD, E, S)) → U62_gagga(C0, D, E, C1, Y, S, carry10_in_ga(C1, C10))
carry10_in_ga(0, 0) → carry10_out_ga(0, 0)
carry10_in_ga(1, 10) → carry10_out_ga(1, 10)
U62_gagga(C0, D, E, C1, Y, S, carry10_out_ga(C1, C10)) → U63_gagga(C0, D, E, C1, Y, sum_in_gaa(C10, Y, S))
U63_gagga(C0, D, E, C1, Y, sum_out_gaa(C10, Y, S)) → calc_out_gagga(C0, D, E, C1, Y)
U56_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, calc_out_gagga(C3, S, M, C4, O)) → U57_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, calc_in_gaaga(C2, E, O, C3, N))
calc_in_gaaga(C0, D, E, C1, Y) → U60_gaaga(C0, D, E, C1, Y, sum_in_gaa(C0, D, CD))
U60_gaaga(C0, D, E, C1, Y, sum_out_gaa(C0, D, CD)) → U61_gaaga(C0, D, E, C1, Y, sum_in_aaa(CD, E, S))
sum_in_aaa(X, Y, Z) → U64_aaa(X, Y, Z, is_in_ag(Z, +(X, Y)))
U64_aaa(X, Y, Z, is_out_ag(Z, +(X, Y))) → sum_out_aaa(X, Y, Z)
U61_gaaga(C0, D, E, C1, Y, sum_out_aaa(CD, E, S)) → U62_gaaga(C0, D, E, C1, Y, S, carry10_in_ga(C1, C10))
U62_gaaga(C0, D, E, C1, Y, S, carry10_out_ga(C1, C10)) → U63_gaaga(C0, D, E, C1, Y, sum_in_gaa(C10, Y, S))
U63_gaaga(C0, D, E, C1, Y, sum_out_gaa(C10, Y, S)) → calc_out_gaaga(C0, D, E, C1, Y)
U57_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, calc_out_gaaga(C2, E, O, C3, N)) → U58_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, calc_in_gaaga(C1, N, R, C2, E))
U58_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, calc_out_gaaga(C1, N, R, C2, E)) → U59_aaaaaaaa(S, E, N, D, M, O, R, Y, calc_in_gaaga(0, D, E, C1, Y))
U59_aaaaaaaa(S, E, N, D, M, O, R, Y, calc_out_gaaga(0, D, E, C1, Y)) → money_out_aaaaaaaa(S, E, N, D, M, O, R, Y)
DEL_IN_AGA(X, .(Y, T), .(Y, NT)) → DEL_IN_AGA(X, T, NT)
DEL_IN_AGA(.(T)) → DEL_IN_AGA(T)
From the DPs we obtained the following set of size-change graphs:
U65_GG(X1, R, L, del_out_aga(X1, L, NL)) → DOMAIN_IN_GG(R, NL)
DOMAIN_IN_GG(.(X1, R), L) → U65_GG(X1, R, L, del_in_aga(X1, L, NL))
money_in_aaaaaaaa(S, E, N, D, M, O, R, Y) → U48_aaaaaaaa(S, E, N, D, M, O, R, Y, carry_in_a(C1))
carry_in_a(1) → carry_out_a(1)
carry_in_a(0) → carry_out_a(0)
U48_aaaaaaaa(S, E, N, D, M, O, R, Y, carry_out_a(C1)) → U49_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, carry_in_a(C2))
U49_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, carry_out_a(C2)) → U50_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, carry_in_a(C3))
U50_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, carry_out_a(C3)) → U51_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, carry_in_a(C4))
U51_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, carry_out_a(C4)) → U52_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =_in_ga(C4, M))
=_in_ga(X, X) → =_out_ga(X, X)
U52_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =_out_ga(C4, M)) → U53_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =\=_in_gg(M, 0))
=\=_in_gg(X0, X1) → =\=_out_gg(X0, X1)
U53_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =\=_out_gg(M, 0)) → U54_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, domain_in_gg(.(S, .(E, .(N, .(D, .(M, .(O, .(R, .(Y, [])))))))), .(0, .(1, .(2, .(3, .(4, .(5, .(6, .(7, .(8, .(9, []))))))))))))
domain_in_gg([], X3) → domain_out_gg([], X3)
domain_in_gg(.(X1, R), L) → U65_gg(X1, R, L, del_in_aga(X1, L, NL))
del_in_aga(X, .(X, T), T) → del_out_aga(X, .(X, T), T)
del_in_aga(X, .(Y, T), .(Y, NT)) → U67_aga(X, Y, T, NT, del_in_aga(X, T, NT))
U67_aga(X, Y, T, NT, del_out_aga(X, T, NT)) → del_out_aga(X, .(Y, T), .(Y, NT))
U65_gg(X1, R, L, del_out_aga(X1, L, NL)) → U66_gg(X1, R, L, domain_in_gg(R, NL))
U66_gg(X1, R, L, domain_out_gg(R, NL)) → domain_out_gg(.(X1, R), L)
U54_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, domain_out_gg(.(S, .(E, .(N, .(D, .(M, .(O, .(R, .(Y, [])))))))), .(0, .(1, .(2, .(3, .(4, .(5, .(6, .(7, .(8, .(9, [])))))))))))) → U55_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =\=_in_ag(S, 0))
=\=_in_ag(X0, X1) → =\=_out_ag(X0, X1)
U55_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, C4, =\=_out_ag(S, 0)) → U56_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, calc_in_gagga(C3, S, M, C4, O))
calc_in_gagga(C0, D, E, C1, Y) → U60_gagga(C0, D, E, C1, Y, sum_in_gaa(C0, D, CD))
sum_in_gaa(X, Y, Z) → U64_gaa(X, Y, Z, is_in_ag(Z, +(X, Y)))
is_in_ag(X0, X1) → is_out_ag(X0, X1)
U64_gaa(X, Y, Z, is_out_ag(Z, +(X, Y))) → sum_out_gaa(X, Y, Z)
U60_gagga(C0, D, E, C1, Y, sum_out_gaa(C0, D, CD)) → U61_gagga(C0, D, E, C1, Y, sum_in_aga(CD, E, S))
sum_in_aga(X, Y, Z) → U64_aga(X, Y, Z, is_in_ag(Z, +(X, Y)))
U64_aga(X, Y, Z, is_out_ag(Z, +(X, Y))) → sum_out_aga(X, Y, Z)
U61_gagga(C0, D, E, C1, Y, sum_out_aga(CD, E, S)) → U62_gagga(C0, D, E, C1, Y, S, carry10_in_ga(C1, C10))
carry10_in_ga(0, 0) → carry10_out_ga(0, 0)
carry10_in_ga(1, 10) → carry10_out_ga(1, 10)
U62_gagga(C0, D, E, C1, Y, S, carry10_out_ga(C1, C10)) → U63_gagga(C0, D, E, C1, Y, sum_in_gaa(C10, Y, S))
U63_gagga(C0, D, E, C1, Y, sum_out_gaa(C10, Y, S)) → calc_out_gagga(C0, D, E, C1, Y)
U56_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, C3, calc_out_gagga(C3, S, M, C4, O)) → U57_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, calc_in_gaaga(C2, E, O, C3, N))
calc_in_gaaga(C0, D, E, C1, Y) → U60_gaaga(C0, D, E, C1, Y, sum_in_gaa(C0, D, CD))
U60_gaaga(C0, D, E, C1, Y, sum_out_gaa(C0, D, CD)) → U61_gaaga(C0, D, E, C1, Y, sum_in_aaa(CD, E, S))
sum_in_aaa(X, Y, Z) → U64_aaa(X, Y, Z, is_in_ag(Z, +(X, Y)))
U64_aaa(X, Y, Z, is_out_ag(Z, +(X, Y))) → sum_out_aaa(X, Y, Z)
U61_gaaga(C0, D, E, C1, Y, sum_out_aaa(CD, E, S)) → U62_gaaga(C0, D, E, C1, Y, S, carry10_in_ga(C1, C10))
U62_gaaga(C0, D, E, C1, Y, S, carry10_out_ga(C1, C10)) → U63_gaaga(C0, D, E, C1, Y, sum_in_gaa(C10, Y, S))
U63_gaaga(C0, D, E, C1, Y, sum_out_gaa(C10, Y, S)) → calc_out_gaaga(C0, D, E, C1, Y)
U57_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, C2, calc_out_gaaga(C2, E, O, C3, N)) → U58_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, calc_in_gaaga(C1, N, R, C2, E))
U58_aaaaaaaa(S, E, N, D, M, O, R, Y, C1, calc_out_gaaga(C1, N, R, C2, E)) → U59_aaaaaaaa(S, E, N, D, M, O, R, Y, calc_in_gaaga(0, D, E, C1, Y))
U59_aaaaaaaa(S, E, N, D, M, O, R, Y, calc_out_gaaga(0, D, E, C1, Y)) → money_out_aaaaaaaa(S, E, N, D, M, O, R, Y)
U65_GG(X1, R, L, del_out_aga(X1, L, NL)) → DOMAIN_IN_GG(R, NL)
DOMAIN_IN_GG(.(X1, R), L) → U65_GG(X1, R, L, del_in_aga(X1, L, NL))
del_in_aga(X, .(X, T), T) → del_out_aga(X, .(X, T), T)
del_in_aga(X, .(Y, T), .(Y, NT)) → U67_aga(X, Y, T, NT, del_in_aga(X, T, NT))
U67_aga(X, Y, T, NT, del_out_aga(X, T, NT)) → del_out_aga(X, .(Y, T), .(Y, NT))
U65_GG(R, del_out_aga(NL)) → DOMAIN_IN_GG(R, NL)
DOMAIN_IN_GG(.(R), L) → U65_GG(R, del_in_aga(L))
del_in_aga(.(T)) → del_out_aga(T)
del_in_aga(.(T)) → U67_aga(del_in_aga(T))
U67_aga(del_out_aga(NT)) → del_out_aga(.(NT))
del_in_aga(x0)
U67_aga(x0)
From the DPs we obtained the following set of size-change graphs: